package com.qidianit.mes.pro.mapper;

import com.qidianit.mes.pojo.qc.CommonDefect;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author: YKYB
 * @Date: 2025/9/21 15:33
 * @Description:
 */
@Mapper
public interface CommonDefectMapper {
    /**
     * 根据缺陷描述、缺陷类型、缺陷等级
     *
     * @param commonDefect
     * @return
     */
    List<CommonDefect> selectList(@Param("param") CommonDefect commonDefect);

    /**
     * 保存
     *
     * @param commonDefect
     * @return
     */
    int save(CommonDefect commonDefect);

    /**
     * 根据id修改
     * @param commonDefect
     * @return
     */
    int updateById(CommonDefect commonDefect);

    /**
     * 根据id删除单个
     * @param id
     * @return
     */
    int deleteById(Long id);

    /**
     * 批量删除
     * @param ids
     * @return
     */
    int batchDelete(@Param("ids") Long[] ids);

    CommonDefect selectById(Long id);
}
